﻿/*****************************************************************************

   Project:   WP7AppLifecycleService
   File:      WP7AppLifecycleServiceItem.cs 
   Creator:   David Carballo (dacarb@gmail.com)
   
   Description:
      Definition of WP7AppLifecycleServiceItem class.

   (C) Copyright 2011, David Carballo
       http://wp7applifecycle.codeplex.com/license

******************************************************************************/

using System;
using Microsoft.Phone.Controls;

namespace WP7AppLifecycleService
{
    /// <summary>
    /// Represents an item associated to a page with its application state handler,
    /// and page state handler. It's an internal class.
    /// </summary>
    internal sealed class WP7AppLifecycleServiceItem
    {
        /// <summary>
        /// Gets or sets the <see cref="PhoneApplicationPage"/> instance the item is associated to.
        /// </summary>
        internal PhoneApplicationPage Page { get; set; }

        /// <summary>
        /// Gets or sets the <see cref="IApplicationStateHandler"/> instance for the page.
        /// </summary>
        internal IApplicationStateHandler ApplicationStateHandler { get; set; }

        /// <summary>
        /// Gets or sets the <see cref="IPageStateHandler"/> instance for the page.
        /// </summary>
        internal IPageStateHandler PageStateHandler { get; set; }

        /// <summary>
        /// Gets or sets the <see cref="Uri"/> instance with the actual Uri of the page, used to distinguish
        /// navigation events among the different pages.
        /// </summary>
        internal Uri PageUri { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the page was tombstoned or not, which
        /// determines whether state needs to be restored or not.
        /// </summary>
        internal bool WasItTombstoned { get; set; }
    }
}
